# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => 'microblog_made_by_venj@ilovemac.net'
  
  private
  
  def authorize
    unless User.find_by_name(session[:user_name])
      flash[:notice] = "Please Login first."
      redirect_to(:controller => "login", :action => "index")
    end
  end
  
  
end
